package com.example.demo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.gzhc365.arch.component.excel.annotation.validate.HCNotBlank;
import com.gzhc365.arch.component.excel.annotation.validate.HCNotNull;
import lombok.Data;

/**
 * @description:
 * @author: hewenjuan
 * @date: Created in 2022/3/4 10:38
 * @version:
 * @modified By:
 */
@Data
public class AlarmInfo {

    @ExcelIgnore
    private static final long serialVersionUID = -2638710117538090448L;

    @HCNotBlank(msg = "标题不能为空") //excel组件的自定义注解 用来判断字符串非空的
    @ExcelProperty(value = "告警标题") //对应的是excel的head的名称
    private String title;

//    @HCNotNull
//    @ExcelProperty(value = "指标")
//    private String metric;
//
//    @HCNotBlank
//    @ExcelProperty(value = "服务")
//    private String service;

//    @HCNotBlank
//    @ExcelProperty(value = "等级")
//    private String level;

//    @HCNotBlank
//    @ExcelProperty(value = "proId")
//    private Long proId;

    //@ExcelMapping(mappingField = "poAddress") //数据转换映射 如果存在数据库实体 与template实体不一致的情况则需要进行转换
    @ExcelProperty(value = "告警内容")
    private String content;
}
